Update Tphase Process
Use the Update Tphase API process to update an individual Tphase (time phase) period for a specified resource and date.
You can either add or overwrite the existing value.
Process Settings
Below are the settings you must define for the Update Tphase API process:
Setting | Description | Sample Value |
---|---|---|
ProcessID | This ID informs Cobra to run the Update Tphase process. | UpdateTphase |
UpdateTphaseFile | This setting refers to the full path and file name of the XML file containing the information that is updated in the Tphase table. If the path is not specified, the Start In directory is used. | C:\Program Files\Deltek\Cobra\UpdateTphase.xml |
Update Tphase XML Structure
The Update Tphase XML file has the following structure:
<UpdateTphase>
<Project Name="xxx">
<CAWP Type="xx"></CAWP>
<Resource></Resource>
<CostClass></CostClass>
<Add></Add>
<Periods>
<Period>
<Date></Date>
<Quantity></Quantity>
</Period>
</Periods>
</UpdateTphase>
The following information is entered between the tags:
- <Project Name> — This is the name of the project. An error occurs if the project does not exist.
- <CAWPType> — This determines the format of the
<CAWP> tag values. Select one of the following options:
CA — Control Account
WP — Work Package
ID — CAWPID
- <CAWP> — This is the
CA,
WP, or
CAWPID value based on the <CAWPType> tag entry.
The CAWPID is a number based on the CAWPID value in Cobra. The CA and WP codes are in the form CA1 / CA2 / CA3 / WP.
For example, if you have a WBS and OBS code for a control account, the format would be 1.1.1.1 / 1200. A work package under this control account would be 1.1.1.1 / 1200 / 01.
An error occurs if the specified CA, WP or CAWPID does not exist.
- <Resource> — This is the name of the resource you want to update. An error occurs if the resource does not exist in the project.
- <CostClass> — This is the two-letter cost class. An error occurs if the specified cost class does not exist in the project.
- <Add> — Enter one of the following values:
0 — This value indicates that the Quantity replaces the existing value.
1 — This value indicates that the Quantity is added to the existing period value.
If this option is omitted, the data is added to an existing entry by default.
- <Period> — This is repeated for each date and quantity being entered in the Tphase spread.
- <Date> — This is the date of the period to replace. The date must be either a calendar date, or the CA or WP finish date.
- <Quantity> — This is the numeric value that is entered into the Tphase period.
Sample Script
Below is a sample script file for an Update Tphase API process:
<UpdateTphase>
<Project Name="DEMOADV">
<CAWP Type="WP">1.1.2.2/1600/03</CAWP>
<BudgetElement>DRAFT</BudgetElement>
<CostClass>CB</CostClass>
<Add>0</Add>
<Periods>
<Period>
<Date>12/31/1999</Date>
<Quantity>400.00</Quantity>
</Period>
<Period>
<Date>01/31/2000</Date>
<Quantity>300.50</Quantity>
</Period>
<Period>
<Date>02/28/2000</Date>
<Quantity>200</Quantity>
</Period>
<Period>
<Date>03/31/2000</Date>
<Quantity>100</Quantity>
</Period>
<Period>
<Date>04/15/2000</Date>
<Quantity>10.50</Quantity>
</Period>
</Periods>
</Project>
</UpdateTphase>